<?php

namespace App\Http\Requests\V3_2_7;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class MessBoardRequiredRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            //'goods_name' => 'required',//选择的标签名称
            'req_type' => ['required',Rule::in([0, 1])]
        ];
    }

    /**
     * 验证错误信息.
     *
     * @return array
     */
    public function messages(): array
    {
        return [
            //'goods_name.required' => '请选择标签名称！',
            'req_type.required' => '请求类型必传！',
            'req_type.in' => '请求类型错误',
        ];
    }
}
